# -*- coding: utf-8 -*-
from random import randint


class Die:
    """一个表示骰子的类"""

    def __init__(self, num_sides=6):
        """骰子默认有6面"""
        self.num_sides = num_sides

    def roll(self):
        """随机扔骰子，返回的结果在1-6之间"""
        return randint(1, self.num_sides)
